package task;

import java.util.Scanner;

public class TestVisitor {
    public static void main(String[] args) {
        String answer="";
        Scanner in=new Scanner(System.in);
        do {
            Visitor v=new Visitor();
            System.out.println("请输入姓名：");
            v.name=in.next();
            System.out.println("请输入年龄：");
            v.age=in.nextInt();
            v.price();
        }while (answer.equals("y"));
        System.out.println("退出程序");
    }
}
